package com.concurrenttest;

/**
 * @author laijianbo
 * 2014-7-28
 */
public class Test{
	public static void main(String[] args) {
		LoggingWidget widget = new LoggingWidget();
		widget.doSomething();
	}
}
class Widget {
    public synchronized void doSomething() {
        System.out.println("do someting");
    }
}

class LoggingWidget extends Widget {
    public synchronized void doSomething() {
        System.out.println(toString() + ": calling doSomething");
        super.doSomething();
    }
}


